﻿using UnityEngine;
using System.Collections;

public class TouchPlate : Touchable {
    public static TouchPlate Main;

    void Awake() {
        Main = this;
    }

    public Vector2 Swipe = Vector2.zero;
    public bool SwipeEnd;
    public bool Swiping { get; private set; }
    private Vector2 _startPoint;
	override public void TouchUpdate(Touch touch) {
	    if (Swiping) {
            Swipe = (touch.position - _startPoint).normalized;
	    } else {
            _startPoint = touch.position;
	        Swiping = true;
            Swiping = true;
	    }
	}

    public override void TouchEnd(Touch touch) {
        SwipeEnd = true;
        Swiping = false;
    }
}
